<%@page import="monster.comm.util.DateUtil"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<%
	String path = request.getContextPath(); 
	
%>


<head>
    <title>后台管理</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta http-equiv="imagetoolbar" content="no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
  <script src="<%=path %>/comm/js/jquery-1.7.1.min.js"></script>
  <script src="<%=path %>/comm/js/public.js"></script>
 <base target="_self">
 <style type="text/css">
body{
    margin: 0px;
    background-image: url('../img/bg.jpg');
    background-position: left top;
    background-repeat: repeat;
}
.u2_normal {
    background-image: url('../img/u2_normal.png');
}

.u2_container {
    position:absolute;
    left:26px;
    top:0px;
    width:1278px;
    height:48px;
}


.schk {
    background-image: url('../img/schk2.png');
}

.u1343_container {
    position:absolute;
    left:286px;
    top:0px;
    width:233px;
    height:52px;
}
.u1345 {
    position:absolute;
    left:467px;
    top:10px;
    width:556px;
    height:23px;
    font-family:Arial;
    text-align:left;
    word-wrap:break-word;
}

.u1348_normal {
    background-image: url('../img/muen_but.png');
}

.u1348_container {
    position:absolute;
    left:4px;
    top:0px;
    width:100px;
    height:28px;
}
.u13488_container {
    position:absolute;
    left:104px;
    top:0px;
    width:100px;
    height:28px;
}
.u13489_container {
    position:absolute;
    left:204px;
    top:0px;
    width:100px;
    height:28px;
}
.u134810_container {
    position:absolute;
    left:304px;
    top:0px;
    width:100px;
    height:28px;
}

#u1348_img {
    position:absolute;
    left:-3px;
    top:-3px;
    width:106px;
    height:34px;
}

.u1349 {
    position:absolute;
    left:0px;
    top:7px;
    
    width:96px;
    height:16px;    
    font-family:Arial;
    text-align:left;
    word-wrap:break-word;
}

.u0_container {
    background-image: url('../img/u0_normal.png');
    position:absolute;
    left:26px;
    top:77px;
    width:1278px;
    height:513px;
}


.u1323_container {
	background-image: url('../img/u1323_normal.png');   
    position:absolute;
    left:0px;
    top:0px;
    width:1279px;
    height:32px;
}
table{
    border-style: solid; border-width: 1px 0;
	border-color: red;
	
}
table .tr3{
	
	background-color: #CEE5F9;
	border-style: solid;border-width: -10px;
    height: 50px;
    padding-left: 0px;
    
	
	
}
.tr1{
	background-color: #FFFFFF;
	border-style: solid; border-width: 2px;border-color: black black;
}
.tr2{
	background-color: #CCFFFF;
	border-style: solid; border-width: 2px;border-color: black black;
}



.u1328_container {
  
    position:absolute;
    left:547px;
    top:6px;
    padding:0px;
    float:left;
    width:254px;
    height:22px;
    
    font-size:14px;
	background-color:#CEE5F9;
	background-image:-webkit-gradient(linear, 0 0, 0 100%,
		color-stop(0, #ec9f95),
		color-stop(0.5, #c93f27),
		color-stop(0.5, #af301f),
		color-stop(1, #f87036));
	-webkit-border-radius:3px;
	border:1px solid #CEE5F9;
	-webkit-box-shadow:0 2px 4px rgba(248,112,54,0.7);
    
}
.u1329 {
    position:absolute;
    left:2px;
    top:2px;
    width:250px;
    height:19px;
    
    font-family:Arial;
    text-align:left;
    word-wrap:break-word;
}
.but{
 position:absolute;
 top:1px;
 
 width:100px;
 height:28px;
 font-size:15px;
	background-color:#E4E4E4;
	background-image:-webkit-gradient(linear, 0 0, 0 100%,
		color-stop(0, #ec9f95),
		color-stop(0.5, #c93f27),
		color-stop(0.5, #af301f),
		color-stop(1, #f87036));
	-webkit-border-radius:3px;
	border:1px solid blue;
	-webkit-box-shadow:0 2px 4px rgba(248,112,54,0.7);
    font-family:Arial;font-size:13px;
    font-weight:bold;font-style:normal;
    text-decoration:none;color:#333333;
}
.cur_but{

 position:absolute;
 top:1px;
 
 width:100px;
 height:28px;
 font-size:15px;
	background-color:#FFFFFF;
	background-image:-webkit-gradient(linear, 0 0, 0 100%,
		color-stop(0, #ec9f95),
		color-stop(0.5, #c93f27),
		color-stop(0.5, #af301f),
		color-stop(1, #f87036));
	-webkit-border-radius:3px;
	border:1px solid blue;
	-webkit-box-shadow:0 2px 4px rgba(248,112,54,0.7);
    font-family:Arial;font-size:13px;
    font-weight:bold;font-style:normal;
    text-decoration:none;color:#333333;
}
</style>

<script type="text/javascript">
$(function(){
	initlist(1);
});

function initlist(type){
	
	var zd="";//$("#u114").val();//中队
	var fd="";//$("#u114").val();//分队
	if(type==2){
		zd=$("#zd").val();//中队
		fd=$("#fd").val();//分队
		
	}
		$("#datas").html("<tr><td colspan='14'>正在加载</td></tr>");
	$.post(
		'<%=path%>/admin/staff_infolist.jsp',
		{
		zd:zd,
		fd:fd
		},
		
		function(data){
			
			if(data.id==100){
				//初始化list
				var list =data.list;
				if(list.length>0){//有数据
					var datas="";
				    var i=1;
					for(var ent in list){
						var STAFF_SN=list[ent].STAFF_SN;
						datas+="<tr class='tr"+i+"'>";
						datas+="<td >"+list[ent].STAFF_NAME+"</td>";
						datas+="<td >"+list[ent].SEXMARK+"</td>";
						datas+="<td >"+list[ent].STAFF_ID+"</td>";
						datas+="<td >"+list[ent].STAFF_TEL+"</td>";
						datas+="<td >"+list[ent].SQUADRON_NO+"</td>";
						datas+="<td >"+list[ent].UNIT_NO+"</td>";
						datas+="<td >"+list[ent].POSITION+"</td>";
						datas+="<td >"+list[ent].A320V2500_POST+"</td>";
						datas+="<td >"+list[ent].A330RRT700_POST+"</td>";
						datas+="<td >"+list[ent].A320V2500_PASS+"</td>";
						datas+="<td >"+list[ent].A330RRT700_PASS+"</td>";
						datas+="<td >"+list[ent].A320V2500_ENGINE+"</td>";
						datas+="<td >"+list[ent].A330RRT700_ENGINE+"</td>";
						datas+="<td ><a href='javascript:void(0)' onclick='edit("+STAFF_SN+")'>编辑</a>   <a href='javascript:void(0)' onclick='del("+STAFF_SN+")'>删除</a</td>";
						datas+="</tr>";
						if(i=1){
							i=2;
						}else{
							i=1;
						}
					}
					$("#datas").html(datas);
				}else{//无数据
					
					$("#datas").html("<tr><td colspan='14'>暂时没有数据</td></tr>");
				}
			}else if(data.id==-200){
				$("#datas").html("<tr><td colspan='14'>程序异常，请联系管理员!</td></tr>");
			}else if(data.id==101){
				
			}
		},'json'
	);
}

function edit(staff_sn){
	location.href='<%=path%>/admin/edit_two.jsp?staff_sn='+staff_sn;
}
function del(staff_sn){
	 
	if(staff_sn==""){
		alert("staff_sn不存在!");
		return;
	}
	
	$.post(
		'<%=path%>/admin/delete_staff.jsp',
		{
		STAFF_SN:staff_sn
		},
		
		function(data){			
			if(data.id==100){
				alert("删除成功");				
				location.href=path+'/admin/index.jsp?';
			}else if(data.id==-200){
				alert("程序异常，请联系管理员!");
			}else if(data.id==101){
				alert("旧密码不正确，不能修改管理员密码");
			}
		},'json'
	);
}
</script>

</head>

<body > 
<!--head-->
  <div id="head"class='u2_img u2_normal u2_container'>
  		<div class="schk u1343_container"></div><!--end schk-->
		<div id="u1345" class="u1345"  >
			<div id="u1345_rtf">
				<p style="text-align:right;">
					<span style="font-family:华文中宋;font-size:18px;font-weight:bold;font-style:normal;text-decoration:none;color:#990000;">
					四川航空股份有限公司成都维修部航班维修排班系统后台维护</span>
				</p>
			</div>
	</div><!--end .u1345-->
		
  </div><!--end #head--->
  <!--button-->
  <DIV id="u1347container" style="position:absolute; left:26px; top:48px; width:400px; height:28px;; overflow:visible">
    
	<button onclick="select(1,'<%=path%>')" class="cur_but" style="left:3px;" >人员信息管理</button>
	<button onclick="select(2,'<%=path%>')" class="but" style="left:103px;" >人员信息新增</button>
	<button onclick="select(3,'<%=path%>')" class="but" style="left:203px;" >admin密码</button>
	<button onclick="select(4,'<%=path%>')" class="but" style="left:303px;" >数据查询维护</button>
	
	 
  </DIV><!--end button-->
 
  <!--内容-->
  <div id="u0" class="u0_container"   >		
		 <!-- 过滤 -->
			  <div  class="u1323_container"   >				
				<div style="position:absolute;left:30px;top:8px;width:1275px;height:16px;"  >
				<p style="text-align:left;left: 15px;">
				<span style="font-family:Arial;font-size:13px;font-weight:normal;font-style:normal;text-decoration:none;color:#333333;">范围选择</span>
				</p>
				
				<SELECT id="zd" style="position:absolute;left:100px;top:0px;width:70px;height:22px;font-family:'Arial';font-size:13px;color:#000000;font-style:normal;font-weight:normal;text-decoration:none;">
					<OPTION selected value="1">1中队</OPTION>
					<OPTION  value="2">2中队</OPTION>
					<OPTION  value="3">3中队</OPTION>
					<OPTION  value="4">4中队</OPTION>
				</SELECT>
				
				<SELECT id="fd" style="position:absolute;left:190px;top:0px;width:70px;height:22px;font-family:'Arial';font-size:13px;color:#000000;font-style:normal;font-weight:normal;text-decoration:none;" >
					<OPTION selected value="1">1分队</OPTION>
					<OPTION  value="2">2分队</OPTION>
					<OPTION  value="3">3分队</OPTION>
					<OPTION  value="4">工作准备组</OPTION>
				</SELECT>
				
				<INPUT id="query" onclick="initlist(2)" type="button" style="position:absolute;left:290px;top:0px;width:70px;height:22px;font-family:'Arial';font-size:13px;color:#000000;font-style:normal;font-weight:normal;text-decoration:none;" value="搜索"   >
				</div>
			</div><!-- end 过滤 -->
			
			<button class="u1328_container" >人员信息列表</button>
		<table cellpadding="0" cellspacing="1"   style="position:absolute;left:2px;top:34px;width:1270px;" border="0">
		 
		   <tr class="tr3" >
		 	<td  style="width: 55px;" >姓名</td>
		 	<td  style="width: 55px;">性别</td>
		 	<td  style="width: 55px;">工号</td>
		 	<td  style="width: 99px;">电话</td>
		 	<td style="width: 55px;">中队</td>
		 	<td style="width: 55px;">分队</td>
		 	<td style="width: 105px;">资质</td>
		 	<td >放行A320/V2500</td>
		 	<td >放行A330/ RR TRENT 700</td>
		 	<td >上岗A320/ V2500</td>
		 	<td >上岗A330/ RR TRENT 700</td>
		 	<td >发动机试车A320/ V2500</td>
		 	<td >上岗A330/ RR TRENT 700</td>
		 	<td style="width: 120px;">操作</td>
		 	</tr>
		 <tbody id="datas">
			
			<tr class="tr2">
			<td >姓名</td>
		 	<td >性别</td>
		 	<td >工号</td>
		 	<td >电话</td>
		 	<td >中队</td>
		 	<td >分队</td>
		 	<td >资质</td>
		 	<td >放行A32</td>
		 	<td >放行A3</td>
		 	<td >上</td>
		 	<td >上</td>
		 	<td >发动</td>
		 	<td >上</td>
		 	<td >操作</td>
			</tr>
			</tbody>
		</table>		 
		
		
  </div>
<!--内容-->
</body>


